Plain copy-file no longer chmods an existing destination.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 29 Dec 2013 18:18:45 +0000 (10:18 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 29 Dec 2013 18:18:45 +0000 (10:18 -0800)
commit165e52ee23afca59a27c31f8db6d84f420ed8424
tree0bb8d7dd9c3dcd943b821b4a01a9a3d682f90060
parent0025feb19ee2dcec58825a621441fad43fc8abb3
Plain copy-file no longer chmods an existing destination.

* doc/lispref/files.texi (Changing Files): Document this.
* etc/NEWS: Document this.
* src/fileio.c (realmask): Now a static var, not a local.
(barf_or_query_if_file_exists): New arg KNOWN_TO_EXIST.
Remove arg STATPTR.  All uses changed.
(Fcopy_file): Do not alter permissions of existing destinations,
unless PRESERVE-PERMISSIONS (renamed from
PRESERVE-EXTENDED-ATTRIBUTES) is non-nil.
Avoid race when testing for existing destinations and for
when input and output files are the same.
If changing the group fails, adjust both default and
preserved permissions so that access is not granted to the
wrong group.
(Fset_default_file_modes, init_fileio): Update realmask.
(Fdefault_file_modes): Use realmask instead of calling umask.
doc/lispref/ChangeLog
doc/lispref/files.texi
etc/ChangeLog
etc/NEWS
src/ChangeLog
src/fileio.c